package sky.service.Impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import sky.dao.UserDAO;
import sky.domain.User;
import sky.service.UserService;

/**
 * Created with IntelliJ IDEA.
 * User: Gauss
 * Date: 11.05.13
 * Time: 13:42
 * To change this template use File | Settings | File Templates.
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserDAO userDAO;


    @Override
    @Transactional
    public User getUserByName(String name) {
        return userDAO.getUser(name);
    }

    @Override
    @Transactional
    public void addUser(User user) {
        userDAO.addUser(user);
    }
}
